package lab02.test11;

class square extends rectangle{//继承

          @Override

   public void printMyWay(){

               System.out.println("显示正方形边长分别为:"+l2+" "+l1+" "+"正方形周长为:"+this.perimeter()+" "+"正方形面积为");


         }

   public double diagonal() {

              return Math.sqrt(l1*l1+l2*l2);

        }

   public double length() {

         return super.length();

         }

   public double perimeter(){

             return super.perimeter();

         }

public double ara(){

             return  super.area();

         }

}
